package org.petstore.persistence;

import org.petstore.domain.Product;

import java.util.List;

public interface ProductDAO {
    /**
     * description 获取productList通过categoryId
     *
     * @param categoryId:
     * @return List<Product>
     * @author huangzhangyan
     * @date 2021/10/31 23:47
     */
    List<Product> getProductListByCategory(String categoryId);

    /**
     * description 通过productId返回product
     *
     * @param productId:
     * @return Product
     * @author huangzhangyan
     * @date 2021/10/31 23:48
     */
    Product getProductByProductId(String productId);

    /**
     * description 通过关键字查找productList
     *
     * @param keywords:
     * @return List<Product>
     * @author huangzhangyan
     * @date 2021/10/31 23:50
     */
    List<Product> searchProductList(String keywords);
}
